package com.website.at.online.blogic;

import com.website.at.fw.blogic.IBussiness;
import com.website.at.fw.dao.IQueryDao;
import com.website.at.online.bean.UserLoginIn;
import com.website.at.online.bean.UserLoginOut;

public class UserLoginBlogic implements IBussiness<UserLoginIn, UserLoginOut> {
	
	private IQueryDao queryDao = null;
	
	private static final String SQL_ID = "User.selectById";


	@Override
	public UserLoginOut execute(UserLoginIn param) {

		System.out.println(param.getUserName());
		System.out.println(param.getPassword());
		
		try {
		String temp = queryDao.executeForObject(SQL_ID, "1", String.class);
		System.out.println(temp);
		} catch(Exception e) {
			e.printStackTrace();
		}
		UserLoginOut result = new UserLoginOut();
		result.setResult("OK");
		return result;
	}
	
	/**
	 * @param queryDao the queryDao to set
	 */
	public void setQueryDao(IQueryDao queryDao) {
		this.queryDao = queryDao;
	}

}
